package com.cl.security.system.controller;

import com.cl.security.base.controller.TreeController;
import com.cl.security.common.result.CommonResult;
import com.cl.security.system.entity.Menu;
import com.cl.security.system.service.MenuService;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("menu")
public class MenuController extends TreeController<Menu,MenuService> {
    private final MenuService menuService;

    public MenuController(MenuService service) {
        super(service,Menu.class);
        this.menuService = service;
    }
    @GetMapping("getByType")
    public CommonResult getByType(Long id,Integer type) {
        return menuService.getByType(id,type);
    }

}
